<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>拖动盒子 mobile</title>
  <link rel="stylesheet" href="index.css">
  <script type="text/javascript">
    (function (win) {
      function setUnitA(){
          var  W = document.documentElement.clientWidth;
          if(W>=1080){
              W=1080;
          }
          document.documentElement.style.fontSize = W / 10.8 +"px";
      }
      var h = null;
      window.addEventListener("resize",function(){clearTimeout(h);h=setTimeout(setUnitA,300);},false);
      setUnitA();
    })(window);
  </script>
</head>
<body>
  <div class="box">
    <div class="box1">12112214311241fafgatggagtq
      <!-- <div class="box2"></div> -->
    </div>
  </div>
  <div class="bar">
    <div class="bar1"></div>
  </div>
  <script src="index.js"></script>
</body>
</html>
